home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
193
< prev
next >
Wrap
Text File
|
1996-08-06
|
3KB
|
55 lines
Path: gabi-soft.fr!usenet
From: kanze@gabi.gabi-soft.fr (J. Kanze)
Newsgroups: comp.lang.c,comp.std.c
Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
Date: 26 Jan 1996 15:48:33 GMT
Organization: GABI Software, Sarl.
Message-ID: <KANZE.96Jan26164833@gabi.gabi-soft.fr>
References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM>
<4e1nd8$hv0@solutions.solon.com> <3104bfc8.132251392@nntp.ix.netcom.com>
<4e2ppd$lsu@solutions.solon.com> <DLnG5H.748@mv.mv.com>
<DLoy4x.AFG@mv.mv.com>
NNTP-Posting-Host: gabi.gabi-soft.fr
In-reply-to: ENGR@GSSI.MV.COM's message of Wed, 24 Jan 1996 15:10:08 GMT
In article <DLoy4x.AFG@mv.mv.com> ENGR@GSSI.MV.COM (Michael Furman)
writes:
> Could somebody please clarify is "C" standard so strict and does not let
> use some constructions that "C++" draft stadard let? Namely:
> 1. Integer conversion when source value can not be represented in destination
> type. In C++ it is defined. In case of both unsigned types it completely
> defined in standard; othervise details of "how it will be converted" must
> be defined by implementation.
I don't see any difference in meaning in the two standards:
C (ISO 9899, section 6.2.1.2): "When a value with integral type is
demoted to a signed integer with smaller size, or an unsigned integer is
converted to its corresponding signed integer, if the value cannot be
represented the result is implementation defined."
C++ (Sept. 1995 draft, section 4.7): "If the destination type is signed,
the value is unchanged if it can be represented in the destination type
(and bitfield width); otherwise the value is implementation defined."
Could you clarify where you see the difference?
> 2. Implementation extention: additional forms of function main, like:
>
> int main(int argc, char * * argv, char * env);
>
> In C++ draft standard said that any implementation must allow 2 kinds if
> "main" definitions, but does not forbid extentions.
Existing practice? Reality? The rule that forbids extensions in the C
standard is completely ignored, as far as I can tell. All of the Unix
compilers I'm familiar with, for example, allow the version you cite (or
rather a version with a char** as third parameter).
--
James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
-- A la recherche d'une activitΘ dans une region francophone